package com.qidianit.mes.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @ author: 周晓轩
 * @ company 起点编程
 * @ time: 2025/9/19 - 18:25
 * @ Description:
 */
@Data
@TableName("workflow_product")
public class WorkflowProduct {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("workflow_id")
    private Long workflowId;

    @TableField("product_code")
    private String productCode;

    private String remarks;

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    private String createBy;

    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    private String updateBy;

    private Integer deleteFlag;

    // 级联产品对象
    @TableField(exist = false) // 非数据库字段
    private Material product;
}
